package com.credithc.customers.manager.schedule;

import com.credithc.customers.base.factory.DictionaryFactory;
import com.credithc.customers.manager.service.ScheduleService;
import lombok.extern.slf4j.Slf4j;
import org.quartz.Job;
import org.quartz.JobExecutionContext;
import org.springframework.beans.factory.annotation.Autowired;

/**
 * @author zhukai
 * @date 19/2/15 0015 10:01
 */
@Slf4j
public class AbnormalJob implements Job {

    @Autowired
    private ScheduleService scheduleService;

    @Override
    public void execute(JobExecutionContext context){
        log.info("=========================================开始处理异常数据=========================================");
        if (DictionaryFactory.SysSettings.enabledTask()) {
            scheduleService.editAbnormalAndEmail();
        }
    }
}
